package com.mrs.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * description: HttpEnum
 * date: 2022/7/15 19:45
 * author: MR.孙
 */

public class HttpEnum implements Serializable {

    public enum  Code{

        OK(200,"成功"), //成功
        UNAUTHORIZED(401,"权限不足"),  // 权限不足
        ARGS_ERROR(400,"参数错误"),// 参数错误
        BAD_REQUEST(404,"请求错误"),
        SERVER_ERROR(500,"服务器错误"), // 系统错误
        OTHER_ERROR(600,"未知错误"); // 其他业务异常
        public Integer code;
        public String msg;

        Code(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

    }

}
